{include file="public/header" /}
<body>
<style>
    .cion{
        display: inline-block;
        width: 120px;
    }
</style>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 商品管理
    <span class="c-gray en">&gt;</span> 订单记录
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="/good/order_record" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form  method="get" action="">
        <div class="text-c">

            <input type="text" class="input-text" style="width:250px" placeholder="订单号" value="{:input('word')}" name="word">
            <button type="submit" class="btn btn-success">搜索</button>
        </div>
    </form>

    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">
        </span>
        <span class="r">共有数据：<strong>{$list->total()}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-hover table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="9">订单列表</th>
        </tr>
        <tr class="text-c">
            <th width="100">oid</th>
            <th width="100">订单号</th>
            <th width="150">记录</th>
            <th width="80">备注</th>
            <th width="80">时间</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $v}
        <tr class="text-c">
            <td>{$v.oid}</td>
            <td>{$v.sn}</td>
            <td>{$v.record}</td>
            <td>{$v.mark}</td>
            <td>{$v.time}</td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="page">
        {$list->render()|raw}
    </div>
</div>

{include file="public/footer" /}

<script type="text/javascript">

    function panding(obj,id){
        var info = '确认要 判定吗，判定之后将冻结接盘人，此订单将重新挂卖？';
        layer.confirm(info,function(index){
            $.ajax({
                type: 'POST',
                url: "{:url('order_trial')}",
                data: {id:id},
                dataType: 'json',
                success: function(data){
                    if(data.status == 'y'){
                        layer.msg("操作成功",{icon:1,time:1000,shade: [0.3, '#000']},function(){
                            location.replace(location.href);
                        });
                    }else{
                        layer.msg(data.info,{icon:2,time:1000,shade: [0.3, '#000']});
                    }
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }

    function order_destroy(obj,id){
        var info = '确认要 销毁吗，销毁之后，此订单将终止收益的继续匹配？';
        layer.confirm(info,function(index){
            $.ajax({
                type: 'POST',
                url: "{:url('order_destroy')}",
                data: {id:id},
                dataType: 'json',
                success: function(data){
                    if(data.status == 'y'){
                        layer.msg("操作成功",{icon:1,time:1000,shade: [0.3, '#000']},function(){
                            location.replace(location.href);
                        });
                    }else{
                        layer.msg(data.info,{icon:2,time:1000,shade: [0.3, '#000']});
                    }
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
</script>